/*
 * IconStore.java
 *
 * Created on 29-mei-2007, 19:28:06
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package imdbfolder.gui.icons;

import java.awt.Image;
import java.io.IOException;
import java.net.URL;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;

/**
 * 
 * @author alex
 */
public class IconStore {

    public static ImageIcon get(String iconFilename) {
        URL resource = IconStore.class.getResource(iconFilename);
        return new ImageIcon(resource);
    }

    public static Image getImage(String iconFilename) {
        URL resource = IconStore.class.getResource(iconFilename);

        try {
            return ImageIO.read(resource);
        }
        catch (IOException e) {
            e.printStackTrace();
        }

        return null;
    }
}
